
#ifndef PRODUCT_H_
#define PRODUCT_H_

#include <string>
#include <sstream>
#include <iomanip>		//KLB

using namespace std;

struct Product
{
private:
   //constants
     

   // private data
        int prod_id;
        int cat_id;
        string prod_name;
        double prod_price;
   
public:
        //data

        // constructors
        Product(int id, int c_id, string name, double price)
        : prod_id(id), cat_id(c_id), prod_name(name), prod_price(price) {} //TD

        // utility functions
        string display() const                  //used to verify whether it has stored the information
        {
                stringstream ss;
                ss << "Product(" << setw(8) << prod_id << ", " << setw(4) << cat_id << ", " << setw(14) << prod_name << ", " << setw(6) << prod_price << ")";
                return ss.str();		//KLB - SAP3 added the setw
        }
        
        //Getters
        int cat_get()           const {return cat_id;}
        int id_get()            const {return prod_id;}
        string name_get()       const {return prod_name;}
        double price_get()      const {return prod_price;}
   
};


#endif //PRODUCT_H_